import Layout from '@/layout'

const suplierRouter = {
  path: '/salesman',
  name: 'salesman-group',
  component: Layout,
  meta: { title: '采购员报表', icon: 'tree', roles: ['m6100'] },
  children: [
    {
      path: 'day',
      component: (resolve) => require(['@/views/salesman-group/day'], resolve),
      name: 'SalesmanDayManage',
      remoteParam: { serviceName: 'bi', path: '/api/statistics/salesman/day/' },
      remoteUrl: '',
      meta: { title: '采购员日报', roles: ['m6110'] }
    },
    {
      path: 'month',
      component: (resolve) => require(['@/views/salesman-group/month'], resolve),
      name: 'SalesmanMonthManage',
      remoteParam: { serviceName: 'bi', path: '/api/statistics/salesman/month/' },
      remoteUrl: '',
      meta: { title: '采购员月报', roles: ['m6120'] }
    },
    {
      path: 'year',
      component: (resolve) => require(['@/views/salesman-group/year'], resolve),
      name: 'SalesmanYearManage',
      remoteParam: { serviceName: 'bi', path: '/api/statistics/salesman/year/' },
      remoteUrl: '',
      meta: { title: '采购员年报', roles: ['m6130'] }
    },
    {
      path: 'top',
      component: (resolve) => require(['@/views/salesman-group/top'], resolve),
      name: 'SalesmanTopManage',
      remoteParam: { serviceName: 'bi', path: '/api/statistics/salesman/top/' },
      remoteUrl: '',
      meta: { title: '采购员排行', roles: ['m6140'] }
    }
  ]
}

export default suplierRouter
